package com.ms.demo.controller;

import com.ms.demo.entity.Emp;
import com.ms.demo.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/test2")
public class Test2Controller {

    @Autowired
    private EmpService empService;

    @GetMapping(value = "query2")
    public void query2() {
        System.out.println("query2");
        Emp emp1 = empService.selectEmpOneById1(1);
        System.out.println("test1库 ：" + emp1.toString());

        Emp emp2 = empService.selectEmpOneById2(1);
        System.out.println("test2库 ：" + emp2.toString());
    }
}